<template>
  <div class="home">
    <baidu-map class="map" :center="center" :zoom="zoom" @ready="handler"></baidu-map>
  </div>
</template>

<script>
export default {
  name: 'HomeView',
  data() {
    return {
      center: {
        lng: 0,
        lat: 0
      },
      zoom: 9
    }
  },
  components: {
  },
  methods: {
    handler({ BMap, map }) {
      console.log(BMap, map)
      this.center.lng = 114.587357
      this.center.lat = 38.044163
      this.zoom = 18
    }
  }
}
</script>

<style lang="less" scoped>
.home {
  display: flex;
  height: 100%;
  .map {
    flex: 1;
    width: 100%;
    min-height: 100%;
  }
}
</style>
